package com.iuv.shortpromotion.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 *
 * 短信推广活动信息表
 *
 * @author mic,
 * @date 2020-09-29
 */
@Entity
public class DemoSmsPromotionTbl {
    /**
     * 推广活动ID
     */
    private Integer promotionId;
    /**
     * 活动名称
     */
    private String promotionName;
    /**
     * 活动开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 活动结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 推送内容
     */
    private String pushContents;
    /**
     * 推送对象(手机号码)
     */
    private String pushMobile;
    /**
     * 创建时间
     */
    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 最后一次推送时间
     */
    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastPushTime;
    /**
     * 是否发送成功;1:成功；0：失败
     */
    private Integer pushStatus;

    /**
     * 模板名称
     */
    @JsonIgnore
    private String templateCode;

    /**
     * 错误信息
     */
    private String errorMessage;

    public DemoSmsPromotionTbl() {
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getPromotionId() {
        return promotionId;
    }

    public void setPromotionId(Integer promotionId) {
        this.promotionId = promotionId;
    }

    public String getPromotionName() {
        return promotionName;
    }

    public void setPromotionName(String promotionName) {
        this.promotionName = promotionName;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getPushContents() {
        return pushContents;
    }

    public void setPushContents(String pushContents) {
        this.pushContents = pushContents;
    }

    public String getPushMobile() {
        return pushMobile;
    }

    public void setPushMobile(String pushMobile) {
        this.pushMobile = pushMobile;
    }

    public Date getLastPushTime() {
        return lastPushTime;
    }

    public void setLastPushTime(Date lastPushTime) {
        this.lastPushTime = lastPushTime;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getPushStatus() {
        return pushStatus;
    }

    public void setPushStatus(Integer pushStatus) {
        this.pushStatus = pushStatus;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }
}
